<div class="form-group {!! !$errors->has($label) ?: 'has-error' !!}">

    <label for="{{$id}}" class="col-sm-2 control-label">{{$label}}</label>

    <div id="{{$name}}-wrap" class="{{$viewClass['field']}}">
        @include('admin::form.error')

        @foreach(old("{$name}.cart_id", $value ?? [""]) as $rowIndex => $item)
        <div class="row" style="margin-bottom: 10px;">
            <div class="col-md-6">
                <select class="form-control {{$class}}" style="width: 100%;" name="{{$name}}[cart_id][]" {!! $attributes !!} required>
                    <option value=""></option>
                    @foreach($options as $select => $option)
                        <option value="{{$select}}" {{ $select == $item ?'selected':'' }}>{{$option}}</option>
                    @endforeach
                </select>
            </div>
            <div class="col-md-4">
                <input class="form-control" value="{{old("{$name}.divided.{$rowIndex}", $divideds[$item] ?? '')}}" type="number" min="0" max="100" name="{{$name}}[divided][]" placeholder="输入分成比例，0~100整数，代表0%~100%" required/>
            </div>
            <div class="col-md-2">
                <a class="btn btn-primary btn-sm plus"><i class="fa fa-plus"></i>添加</a>
                <a class="btn btn-primary btn-danger minus"><i class="fa fa-minus"></i>删除</a>
            </div>
        </div>
        @endforeach
        @include('admin::form.help-block')

    </div>
</div>